package org.senseframework.support.orm.mybatis.mysql;

import org.senseframework.support.orm.data.PageData;
import org.senseframework.support.orm.mybatis.query.builder.InsertBuilder;
import org.senseframework.support.orm.mybatis.query.builder.QueryBuilder;
import org.senseframework.support.orm.mybatis.query.builder.UpdateBuilder;

import java.util.List;

/**
 * Author lanjian
 * Email  jianlan@iflytek.com
 */
public interface MySqlBaseDao<T> {
    

    int update(UpdateBuilder updateBuilder);


    int insert(InsertBuilder insertBuilder);


    int count(QueryBuilder queryBuilder);


    List<T> list(QueryBuilder queryBuilder);


    T one(QueryBuilder queryBuilder);

    <K>K sum(QueryBuilder queryBuilder);

    PageData page(QueryBuilder queryBuilder);
}
